package xixirupan.tmgp.tencent.com.vmeim.ui.mine.presenter;

import android.content.Context;
import android.view.LayoutInflater;
import android.widget.GridView;

import java.util.List;

import xixirupan.tmgp.tencent.com.vmeim.ui.mine.model.IMineData;
import xixirupan.tmgp.tencent.com.vmeim.ui.mine.model.MinDataBiz;
import xixirupan.tmgp.tencent.com.vmeim.ui.mine.model.UserCenterBannersBaen;

/**
 * Created by lenovo on 2016/10/20.
 */

public class MinePresenter {
    GridMineAdapter adapter;
    MinDataBiz biz  =new MinDataBiz();
    Context context;
    LayoutInflater inflater;
    GridView gridView;
    public MinePresenter(GridView gridView,Context context, LayoutInflater inflater)
    {
        this.gridView =gridView;
         this.context =context;
        this.inflater =inflater;
    }


    public void getData()
    {
        biz.getMineData(new IMineData() {
            @Override
            public void postMinData(List<UserCenterBannersBaen> lists) {
                adapter =new GridMineAdapter(lists,context,inflater);
                gridView.setAdapter(adapter);

            }
        });
    }
}
